<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>登录</title>
    <!-- 引入JQuery -->
    <script src="js/jquery-3.4.1.min.js" th:src="@{/js/jquery-3.4.1.min.js}"></script>
    <!-- 引入BootStrap-->
    <link href="css/bootstrap/css/bootstrap.min.css" th:href="@{/css/bootstrap/css/bootstrap.min.css}" rel="stylesheet"/>
    <script src="css/bootstrap/js/bootstrap.min.js" th:src="@{/css/bootstrap/js/bootstrap.min.js}"></script>
</head>
<h1>登录</h1>
<!--<form action="#" th:action="@{/checkUser}" th:object="${user}" method="post">-->
<!--    账号：<input type="text" th:field="*{user_name}" />-->
<!--    密码：<input type="text" th:field="*{user_passwd}" />-->
<!--    <input type="submit" />-->
<!--</form>-->
<body class="text-center">
<div class="loginForm">
    <h2>用户登录</h2>
    <form th:action="@{/login}" th:method="post">
        <div class="form-group">
            <label for="exampleInputEmail1">用户名</label>
            <input type="email" class="form-control" id="exampleInputEmail1" placeholder="请输入用户名">
        </div>
        <div class="form-group">
            <label for="exampleInputPassword1">密码</label>
            <input type="password" class="form-control" id="exampleInputPassword1" placeholder="请输入密码">
        </div>

        <div class="checkbox">
            <label>
                <input type="checkbox"> 同意
                <a href="#">&nbsp;&nbsp;&nbsp;&nbsp;xxx安全协议</a> 与 <a href="#">&nbsp;&nbsp;&nbsp;&nbsp;xxx隐私协议</a>
            </label>
        </div>
        <div class="button">
            <input type="submit" class="btn btn-primary" value="登 录"/>
        </div>
    </form>
</div>
</body>
<style>
    body{
        background: gray;
    }
    .loginForm {
        /*边框高度*/
        height: 350px;
        /*边框宽度*/
        width: 500px;
        /*边框颜色*/
        border: #4d4d4d solid 1px;
        /*边框圆角*/
        border-radius: 4px;
        /*阴影 水平方向，竖直方向，模糊距离*/
        box-shadow: 5px 5px 5px #4d4d4d;
        /*上边界距离*/
        margin-top: 300px;
        /*左边界距离：自动*/
        margin-left: auto;
        /*右边界距离：自动*/
        margin-right: auto;
        /*用户名、密码间距*/
        padding: 20px 40px;
    }

    /*将用户登录置于中间*/
    .loginForm h2 {
        text-align: center;
    }

    /*修改button属性*/
    .button {
        text-align: center;
        vertical-align: middle;
    }
</style>
</html>